package io.adrainty.bolee.insurance.feign.impl;

import io.adrainty.bolee.framework.commons.basic.ResultDTO;
import io.adrainty.bolee.framework.commons.utils.ResultDTOUtil;
import io.adrainty.bolee.insurance.feign.IWarrantyFeign;
import io.adrainty.bolee.insurance.service.IWarrantyService;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>WarrantyFeignImpl</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description IWarrantyFeign
 * @since 2025/8/26 13:55:55
 */

@Tag(name = "保险合同")
@RestController
@RequestMapping("/warranty-feign")
public class WarrantyFeignImpl implements IWarrantyFeign {

    @Resource
    private IWarrantyService warrantyService;

    @Override
    @PostMapping("/clean-warranty/{warrantyNo}")
    public ResultDTO<Boolean> cleanWarranty(@PathVariable("warrantyNo") String warrantyNo) {
        Boolean result = warrantyService.cleanWarranty(warrantyNo);
        return ResultDTOUtil.success(result);
    }

}
